<template>
	<view class="container debtinfo">
		<myhead :title="mytitle"></myhead>
		<view class="main">
			<view class="searchbox">
				<view class="search">
					<icon type="search" class="searchicon"></icon>
					<input class="searchinput" placeholder="请输入内容"/>
				</view>	
			</view>
			<scroll-view class="userlist" scroll-y="true">
				<view class="item" v-for="(item,index) in 8" :key = "index">
					<navigator class="itemleft" url="../guestdetail/guestdetail">
						<view class="left">
							<view class="username">
								客户名字{{index}}
							</view>
							<view class="info">
								<text>赊欠：</text>
								<text style="color: #DD524D; font-size: 32rpx; font-weight: bold;">3665元</text>
							</view>
						</view>
						<view class="right">
							<image src="../../static/images/blackright.png" class="routericon"></image>
						</view>
					</navigator>
					<view class="itemright" @tap = "changepaytypeflag">
						<view class="btn">
							还款
						</view>
					</view>
				</view>
			</scroll-view>
			<view class="cover" v-if="paytypeflag" @tap = "changepaytypeflag"></view>
			<paytype  v-if="paytypeflag" class="mypaytype" @changepaytypeflag = "changepaytypeflag"></paytype>
		</view>
	</view>
</template>

<script>
	import myhead from "../../components/header/header.vue"
	import paytype from "../../components/paytype/paytype.vue"
	export default {
		data() {
			return {
				mytitle:'还款登记',
				paytypeflag:false
			};
		},
		methods:{
			changepaytypeflag(){
				this.paytypeflag = !this.paytypeflag
			}
		},
		components:{
			myhead,
			paytype
		}
	}
</script>

<style lang="scss" scoped>
.debtinfo{
	color:black;
	display: flex;
	flex-direction: column;
	.main{
		width: 100%;
		flex: 1;
		display: flex;
		overflow: hidden;
		flex-direction: column;
		position: relative;
		.searchbox{
			padding: 10rpx 12rpx;
			box-sizing: border-box;
		}
		.userlist{
			flex: 1;
			overflow: hidden;
			background-color: #EEEEEE;
			box-sizing: border-box;
			padding: 20rpx;
			.item{
				display: flex;
				justify-content: space-between;
				align-items: center;
				font-size: 30rpx;
				background-color: #FFFFFF;
				margin-bottom: 15rpx;
				border-radius: 16rpx;
				.itemleft{
					flex: 1;
					display: flex;
					justify-content: space-between;
					align-items: center;
					padding: 30rpx 20rpx;
					.left{
						.username{
							margin-bottom: 10rpx;
						}
						.info{
							color: gray;
							font-size: 24rpx;
						}
					}
					border-right: 2rpx solid #C8C7CC;
				}
				.itemright{
					padding: 0rpx 30rpx;
					.btn{
						font-size: 20rpx;
						padding: 10rpx 20rpx;
						background-color: #353766;
						color:  #E4E7ED;
						border-radius: 28rpx;
					}
				}
			}
		}
		.cover{
			position: absolute;
			top: 0;
			bottom: 0;
			width: 100%;
			background-color: rgba(0,0,0,0.5);
			z-index: 400;
		}
		.mypaytype{
			position: absolute;
			left: 0;
			width: 100%;
			bottom: 0;
			z-index: 500;
		}
	}
}
</style>
